﻿using Xejen.Ipc.Framework.Controllers;
using Xejen.Ipc.Framework.Flows;
using Xejen.Ipc.Framework.Steps;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;

namespace Xejen.Ipc.Framework.Flows
{
    /// <inheritdoc cref="IFlowExecutionContext{TData}"/>
    internal class FlowExecutionContext<TData> : IFlowExecutionContext<TData>
        where TData : new()
    {
        /// <inheritdoc/>
        public TData Data { get; set; }

        /// <inheritdoc/>
        public IFlow<TData> Flow { get; set; }

        /// <inheritdoc cref="FlowExecutionContext{TData}"/>
        public FlowExecutionContext() : this(new TData())
        {

        }

        /// <inheritdoc cref="FlowExecutionContext{TData}"/>
        public FlowExecutionContext(TData data)
        {
            Data = data;
        }
    }
}
